<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/main.css">
<script src="../../libs/jquery.min.js"></script>
<script src="../../plugins/layer/layer.js"></script>
<script src="../../libs/bootstrap.min.js"></script>
<script src="../../libs/vue.min.js"></script>
<script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
<script src="../../js/common.js"></script>
	<link rel="stylesheet" href="../userlist.css">

</head>
<body>
<div id="rrapp" v-cloak>
		<transition>
	<div id="users" v-show="usershow">

		<div id="userface">
			<div id="search">
				<div class="form-group col-sm-8">
					<input type="text" class="form-control" v-model="username" @keyup.enter="queryuser" placeholder="用户名/id">
				</div>
				<a class="col-sm-4 btn btn-default" @click="queryuser">查询</a>
			</div>
			<div id="userlist">
				<div id="list" class="list-group">
					<a href="#" id="all" class="list-group-item list-group-item-success" @click="querycollectbyuser">全部用户</a>
					<a href="#" v-for="item in users.list" :value="item.userinfoid" class="list-group-item" @click="querycollectbyuser"><span class="glyphicon glyphicon-user"></span>   {{item.useraccount}}</a>
				</div>
				<div id="loading" class="load-container">
					<div class="loader"></div>
					<p>加载中请稍后...</p>
					<!--<span class="glyphicon glyphicon-refresh"></span>-->
				</div>
			</div>
		</div>
		<div id="pagers">
			<ul class="pager">
				<li id="previous" class="previous disabled" @click="previous"><a href="#"><<</a></li>
				<li><span>第{{users.currPage}}页</span></li>
				<li id="next" class="next" @click="next"><a href="#">>></a></li>
			</ul>
		</div>
	</div>
		</transition>
	<div id="toggle">
		<div @click="ushow" id="togglebtn">
			<span class="glyphicon glyphicon-chevron-left"></span>
		</div>

	</div>
	<div id="rrapp2" v-cloak>
		<div v-show="showList">
			<div class="grid-btn">
				<div class="form-group col-sm-2">
					<input type="text" class="form-control" v-model="searchParam" @keyup.enter="query" placeholder="收藏ID">
				</div>
				<div class="form-group col-sm-2">
					<select class="form-control" v-model="searchType">
						<option value="">类型</option>
						<option value="0">工程</option>
						<option value="1">车队</option>
					</select>
				</div>
				<a class="btn btn-default" @click="query">查询</a>
				<a v-if="hasPermission('collect:collectinfos:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
				<a v-if="hasPermission('collect:collectinfos:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
				<a v-if="hasPermission('collect:collectinfos:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</div>
			<table id="jqGrid"></table>
			<div id="jqGridPager"></div>
		</div>

		<div id="desc" v-show="!showList" class="panel panel-default">
			<div class="panel-heading">{{title}}</div>
			<form class="form-horizontal">
				<div class="form-group" v-show="collectinfos.collectinfoid != null ? true : false">
					<div class="col-sm-2 control-label">收藏ID</div>
					<div class="col-sm-10">
						<input type="text" disabled="disabled" class="form-control" v-model="collectinfos.collectinfoid" placeholder="收藏ID"/>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">收藏人</div>
					<div class="col-sm-10">
					  <input type="text" style="cursor:pointer" readonly="readonly" @click="selectUser" class="form-control" v-model="userinfo.useraccount" placeholder="收藏人"/>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label">项目</div>
					<div class="col-sm-10">
					  <input type="text" style="cursor:pointer" readonly="readonly" @click="selectProject" class="form-control" v-model="projectinfo.projectname" placeholder="信息id"/>
					</div>
				</div>
				<div class="form-group" v-show="collectinfos.createtime != null ? true : false">
					<div class="col-sm-2 control-label">创建时间</div>
					<div class="col-sm-10">
						<input type="text" disabled="disabled"  class="form-control" v-model="collectinfos.createtime" placeholder="创建时间"/>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-2 control-label"></div>
					<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
					&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
				</div>
			</form>
		</div>
	</div>
	<div v-show="false" id="selectUserID">
		<div class="form-group col-sm-2">
			<input type="text" class="form-control" v-model="selectUserSearchParam" @keyup.enter="selectUserQuery" placeholder="用户账户,用户ID">
		</div>
		<a class="btn btn-default" @click="selectUserQuery">查询</a>
		<table id="selectLayer"></table>
		<div id="selectLayerPager"></div>
	</div>
	<div v-show="false" id="selectProjectID">
		<div class="form-group col-sm-2">
			<input type="text" class="form-control" v-model="selectProjectSearchParam" @keyup.enter="selectProjectQuery" placeholder="用户账户,用户ID">
		</div>
		<a class="btn btn-default" @click="selectProjectQuery">查询</a>
		<table id="selectProjectLayer"></table>
		<div id="selectProjectLayerPager"></div>
	</div>
</div>
<script src="../userlist.js"></script>
<script src="../../js/modules/collect/collectinfos.js"></script>

</body>
</html>